export const constantRoutes = [
  {
    path: "/",
    component: () => import("@/views/layout/index.vue"), // 路由懒加载import
    name: "Layout", // 命名空间name，命名路由（路由权限控制）
    meta: {
      title: "布局页面",
      icon: "HomeFilled",
      hidden: false,
    },
    redirect: "/home",
    children: [
      {
        path: "/home",
        component: () => import("@/views/home/index.vue"), // 路由懒加载import
        name: "Home", // 命名空间name，命名路由（路由权限控制）
        meta: {
          title: "公司首页",
          icon: "HomeFilled",
          hidden: false,
        },
      },
    ],
  },
  {
    path: "/acl",
    component: () => import("@/views/layout/index.vue"),
    name: "SystemManagement",
    meta: {
      title: "权限管理",
      icon: "UserFilled",
      hidden: false,
    },
    redirect: "/acl/user",
    children: [
      {
        path: "/acl/user",
        component: () => import("@/views/acl/user/index.vue"),
        name: "Lock",
        meta: {
          title: "用户管理",
          icon: "User",
          hidden: false,
        },
      },
      {
        path: "/acl/role",
        component: () => import("@/views/acl/role/index.vue"),
        name: "Role",
        meta: {
          title: "角色管理",
          icon: "View",
          hidden: false,
        },
      },
      {
        path: "/acl/menu",
        component: () => import("@/views/acl/menu/index.vue"),
        name: "Menu",
        meta: {
          title: "菜单管理",
          icon: "MoreFilled",
          hidden: false,
        },
      },
    ],
  },
  {
    path: "/product",
    component: () => import("@/views/layout/index.vue"),
    name: "ProductManagement",
    meta: {
      title: "商品管理",
      icon: "ShoppingBag",
      hidden: false,
    },
    redirect: "/product/brand",
    children: [
      {
        path: "/product/brand",
        component: () => import("@/views/product/brand/index.vue"),
        name: "Brand",
        meta: {
          title: "品牌管理",
          icon: "Goods",
          hidden: false,
        },
      },
      {
        path: "/product/property",
        component: () => import("@/views/product/property/index.vue"),
        name: "Property",
        meta: {
          title: "属性管理",
          icon: "MagicStick",
          hidden: false,
        },
      },
      {
        path: "/product/sku",
        component: () => import("@/views/product/sku/index.vue"),
        name: "Sku",
        meta: {
          title: "SKU管理",
          icon: "Sell",
          hidden: false,
        },
      },
      {
        path: "/product/spu",
        component: () => import("@/views/product/spu/index.vue"),
        name: "Spu",
        meta: {
          title: "SPU管理",
          icon: "SoldOut",
          hidden: false,
        },
      },
    ],
  },
  {
    path: "/login",
    component: () => import("@/views/login/index.vue"), // 路由懒加载import
    name: "Login", // 命名空间name，命名路由（路由权限控制）
    meta: {
      title: "登录页面",
      icon: "User",
      hidden: true,
    },
  },
  {
    path: "/screen",
    component: () => import("@/views/screen/index.vue"),
    name: "Screen",
    meta: {
      title: "数据大屏",
      icon: "SwitchFilled",
      hidden: false,
    },
  },
  {
    path: "/404",
    component: () => import("@/views/404/index.vue"),
    name: "404",
    meta: {
      title: "错误页面",
      icon: "ElementPlus",
      hidden: true,
    },
  },
  {
    path: "/:pathMatch(.*)*",
    component: () => import("@/views/404/index.vue"),
    name: "Any",
    meta: {
      title: "任意页面",
      icon: "Eleme",
      hidden: true,
    },
  },
];
